package com.example.redis.moduel.exception;

import lombok.Data;

/**
 * @author xiah
 * @date 2018/4/26 13:58
 */
@Data
public class ExceptionBase extends RuntimeException {
       private Integer code;
       private String message;

       public ExceptionBase(Integer code, String message) {

              this.code = code;
              this.message = message;

       }

       public ExceptionBase(Integer code) {
              String content=ExceptionEnum.getName(code);
              this.message = content;

       }

       @Override
       public synchronized Throwable fillInStackTrace() {
              return this;
       }
}
